<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-else,v-else-if</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
</head>
<body>
    <div id="box">
        <h1>抢座位</h1>
        <!-- v-if决定是否渲染某一个dom节点，如果是false，则整个dom节点都消失 -->
        <h3 v-if="flag === 1">1号座</h3>
        <h3 v-else-if="flag === 2">2号座</h3>
        <h3 v-else-if="flag === 3">3号座</h3>
        <h3 v-else = "flag">坐地上</h3>
    </div>
</body>
<script>
    const vm = new Vue({
        //该节点内可以使用vue组件
        el:"#box",
        data(){
            return{
               flag:5
            }
        }
    });
</script>
</html>